# -*- coding: utf-8 -*-
import re
c=open('c.txt').readlines()
print c,len(c)
h=c[0].replace('\n','')
print h
s=int(c[1].replace('\n',''))
print s
e=int(c[2].replace('\n',''))
print e
t=[]
for x in range(s,e):
  fname=h+str(x)
  f=open(fname)
  html=f.read()
##  print c
  pattern=fname
  try:
    cd_no=re.search(pattern,html).group(0)
  except:
    continue
  pattern=r'<div id="Layer2" style="position:absolute; width:232px; height:18px; z-index:2; left: 80px; top: 154px;">.+?<\/div>'
  try:
    cd_company=re.search(pattern,html).group(0)
    pattern=r'<.+?>'
    cd_company=re.sub(pattern,'',cd_company)
    t.append(cd_company)
  except:
    cd_company=""
  print x,u"企业名称：",cd_company
  f.close
print len(list(set(t)))


